﻿using Cl.Entity.BaseEntity;
using SqlSugar;

namespace Cl.Entity.DataBaseEntity.User
{
    [SugarTable("User_User")]
    public class User : EntityBaseComplete
    {


        public string UserName { get; set; } = string.Empty;


        public string Account { get; set; } = string.Empty;

        [SugarColumn(ColumnDataType = "Nvarchar(200)")]
        public string PassWord { get; set; } = string.Empty;

        public string Phone { get; set; } = string.Empty;

        public int IsEnable { get; set; } = 1;


        #region 导航 1v1

        public int? DepartmentId { get; set; }
        //标准配置 推荐
        [Navigate(NavigateType.OneToOne, nameof(DepartmentId))]
        public Department Department { get; set; }





        #endregion


        #region 导航 1vN

        [Navigate(NavigateType.OneToMany, nameof(UserRole.UserId))]
        public List<UserRole> UserRoles { get; set; }

        #endregion

    }
}
